<?php

$http=new swoole_http_server("0.0.0.0",8811);



//设置静态文件路径

$http->set([
    
    'enable_static_handler'=>true,
    'document_root'=>"/www/wwwroot/ymh/root", 
]);

//获取请求的
$http->on('request',function ($request,$response){
    
    $data=$request->get;
    var_dump($data);
    //返回请求
    $response->end(json_encode($data));
});


$http->start();

